/* 
  1. 属性的定义
*/

import React from 'react';

class Demo extends React.Component {
  render() {
    console.log(this.props);
    return (
      <h1>
        Demo 组件(类组件形式):{this.props.msg}:{this.props.children}
      </h1>
    );
  }
}
/* 
  <Demo>
      <span>123</span>
  </Demo>
  
  vue => <slot #defalut="slopProps"></slot>
*/
function App() {
  return (
    <div>
      <h1>App 组件</h1>
      <Demo title='小demo' msg='msg'>
        <span>插槽的内容</span>
      </Demo>
    </div>
  );
}
export default App;
